package DiErZhou.Secondweek;

public class Worktwo {
    public static void main(String[] args) {
        int [] k={12,3,5,2,6,9,11,14};
        int max=k[0],min=k[0];
        for (int i = 0; i < k.length; i++) {
            if (max<k[i])
                max=k[i];
        }
        System.out.println("最大值max=" + max+",");
        for (int i = 0; i < k.length; i++) {
            if (min>k[i])
                min=k[i];
        }
        System.out.println("最小值是min=" + min+"。");

    }
}
